import type { ProductCategoryRelation, ProductRelation } from './product'
import type { PageDto } from './request'

export interface Coupon {
  id?: number
  type?: 0 | 1 | 2 | 3
  name?: string
  platform?: 0 | 1 | 2
  count?: number
  amount?: number
  perLimit?: number
  minPoint?: number
  startTime?: string
  endTime?: string
  useType?: 0 | 1 | 2
  note?: string
  publishCount?: number
  useCount?: number
  receiveCount?: number
  enableTim?: string
  code?: number
  memberLevel?: number
  enableTime?: string
}

export interface CouponDto extends Coupon {
  productCategoryRelationList?: ProductCategoryRelation[]
  productRelationList?: ProductRelation[]
}

export interface CouponPageDto extends PageDto {
  name?: string
  type?: number
}

export interface CouponHistory {
  couponCode?: string
  couponId?: number
  createTime?: string
  getType?: number
  id?: number
  memberId?: number
  memberNickname?: string
  orderId?: number
  orderSn?: string
  useStatus?: number
  useTime?: string
}

export interface CouponHistoryPageDto extends PageDto {
  couponId?: number
  orderSn?: string
  useStatus?: number
}
